package com.tulele.vtool.mapper;

import com.tulele.vtool.model.PlatformActivityInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

@Component(value = "platformActivityInfoMapper")
public interface PlatformActivityInfoMapper {

    /**
     * 添加平台活动信息
     * @param platformActivityInfo
     * @return
     */
    int addPlatformActivityInfo(PlatformActivityInfo platformActivityInfo);

    /**
     * 更新平台活动信息
     * @param platformActivityInfo
     * @return
     */
    int updatePlatformActivityInfo(PlatformActivityInfo platformActivityInfo);

    /**
     * 根据活动类型查询平台活动信息
     * @param actType
     * @return
     */
    PlatformActivityInfo queryPlatformActivityInfoByType(int actType);

    /**
     * 查询用户对砍价活动的参与状态
     * @param userId
     * @param bargainActId
     * @return
     */
    int queryUserParticipateActStatus(@Param("userId")Integer userId, @Param("bargainActId")Integer bargainActId);
}